<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>飞腾会-FitaClub</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current bg-light-gray">
      <header class="bar bar-nav fita-header">
        <a href="javascript:history.back(-1);" class="icon icon-left pull-left"></a>
        <a class="icon icon-menu pull-right open-panel"></a>
        <h1 class="title">个人中心</h1>
      </header>
      <div class="bar bar-footer fita-footer row no-gutter profile-footer">
        <c:if test="${!agent.company.disabledPrimaryAgent && empty agent.company.primaryAgent}">
          <a href="${ctx.host}/profile/secondary-agents/recruit" class="button col-50 ">招募我的FITA</a>
          <button id="logout" class="button col-50">退出登录</button>
				</c:if>
        <%-- <a href="${ctx.host}/profile/recruit" class="button col-50 ">FITA招募</a> --%>
        <c:if test="${agent.company.disabledPrimaryAgent || not empty agent.company.primaryAgent}">
          <button id="logout" class="button col-100">退出登录</button>
				</c:if>
      </div>
      <div class="content profile-content">
        <div class="list-block media-list user-infos" style="margin: .5rem;">
		      <ul>
		        <li>
		          <a href="${ctx.host}/profile/info" class="item-content item-link">
		            <!-- <div class="item-media"><img src="http://gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i3/TB10LfcHFXXXXXKXpXXXXXXXXXX_!!0-item_pic.jpg_250x250q60.jpg" style='width: 4rem;'></div> -->
	              <div class="item-inner">
		              <div class="item-title-row">
		                <p class="no-margin pull-left" style="font-size: .85rem; color: #000; margin: .5rem 0;">姓名：${agent.name}</p>
										<%-- <a class="pull-right" href="${ctx.host}/profile/detail" >设置</a> --%>
									</div>
		              <div class="item-text" style="font-size: .65rem;">
		                <div>
			                <span>电话： ${agent.mobile}</span>&nbsp;
			                <span>邮箱： ${agent.email}</span>
		                </div>
		                <%-- <p class="no-margin">公司名称：${agent.company.companyName}</p> --%>
		              </div>
		            </div>
		          </a>
		        </li>
		      </ul>
		    </div>
		    <div class="list-block wallet-wrap" style=" margin: .5rem; background:#fff;">
          <div class="row account-layout">
            <a href="${ctx.host}/profile/wallet" class="col-50 item text-center">
              <img src="${ctx.resource}/images/profile-icon-1.png" style="width: 2.2rem;margin-bottom: .25rem;">
              <div>我的钱包</div>
            </a>
            <a href="${ctx.host}/profile/recharge" class="col-50 item text-center">
              <img src="${ctx.resource}/images/profile-icon-2.png" style="width: 2.2rem;margin-bottom: .25rem;">
              <div>余额充值</div>
            </a>
          </div>
		    </div>
		    
		    <div class="list-block list-layout" style="margin: .5rem;">
					<ul>
						<li class="item-content item-link">
							<a href="${ctx.host}/orders" class="item-inner">
								<div class="item-title">我的订单</div>
							</a>
						</li>
					</ul>
					<c:if test="${empty agent.company.primaryAgent && !agent.company.disabledPrimaryAgent}">
						<ul>
							<li class="item-content item-link">
								<a href="${ctx.host}/profile/secondary-agents" class="item-inner">
									<div class="item-title">我的FITA</div>
								</a>
							</li>
						</ul>
					</c:if>

				<%--    <ul class="disabled">
			      <li class="item-content item-link">
			        <a href="javascript:void(0);" class="item-inner">
			          <div class="item-title">FITA(线下)订单</div>
			        </a>
			      </li>
			    </ul>--%>
			    <ul>
			      <li class="item-content item-link">
			        <a href="${ctx.host}/coupon/unuse" class="item-inner">
			          <div class="item-title">我的优惠券</div>
			          <div class="item-after">${couponNumber}张有效</div>
			        </a>
			      </li>
			    </ul>
			    <ul class="disabled">
			      <li class="item-content item-link">
			        <a href="javascript:void(0);" class="item-inner">
			          <div class="item-title">积分商城</div>
			          <div class="item-after">积分：0</div>
			        </a>
			      </li>
			    </ul>

			  </div>
	      <!-- <div style="margin: .5rem;" class="button-group">
		      <a href="tel:1388888888" class="button  customer-button">我的专属客服：某某某（1388888888）</a>
		      <a href="javascript:void(0);" class="button">退出</a>
		    </div> -->
      </div>
    </div>
    
    <div class="panel-overlay"></div>
    <div class="panel panel-right panel-cover fita-panel">
      <div class="list-block contacts-block no-margin">
        <p class="menu-title close-panel">关闭</p>
	      <ul>
	        <li>
	          <a href="${ctx.host}/cars/search" class="item-content item-link">
	            <div class="item-inner">
	              <div class="item-title">立即租车</div>
	            </div>
	          </a>
	        </li>
	        <li>
	          <a href="${ctx.host}/profile" class="item-content item-link">
	            <div class="item-inner">
	              <div class="item-title">个人中心</div>
	            </div>
	          </a>
	        </li>
	      </ul>
      </div>
    </div>
  </div>
  <!-- <a ctx.host="/order/order-staying-list">保留预定</a>
  <a ctx.host="/order/order-unpaid-list">未支付</a>
  <a ctx.host="/order/order-paid-list">已支付</a>
  <a ctx.host="/order/order-finished-list">已完成</a> -->
	<%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/profile/profile.js" />
  <script type="text/javascript">
    require(['page/profile/profile'], function(page) {
      page.init({})
    })
  </script>
 
</body>
</html>